package com.ruoyi.finance.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/** 付款主表：PaymentMaster，付款明细表： PaymentVoucher*/
@Data
@TableName(value="tb_payment_voucher")
public class PaymentVoucher {

    private static final long serialVersionUID = 1L;

    /** 主键 */
    @TableId(value = "payment_voucher_id")
    private String paymentVoucherId;

    /** 付款单主表id*/
    @TableField("payment_master_id")
    private String paymentMasterId;

    /** 采购单号ID（关联：tb_payment_request）*/
    @TableField("procured_order_id")
    private String procuredOrderId;

    /** 申请ID（关联：tb_payment_request）*/
    @TableField("payment_request_id")
    private String paymentRequestId;

    /** 付款单状态：0未核准，1未过账，2已过账*/
    @TableField("payment_voucher_status")
    private String paymentVoucherStatus;

    /** 付款单类型：0采购应付款，1采购预付款*/
    @TableField("payment_voucher_type")
    private String paymentVoucherType;

    /** 申请金额*/
    @TableField("payment_voucher_amount_due")
    private BigDecimal paymentVoucherAmountDue;

    /** 付款备注*/
    @TableField("payment_voucher_remark")
    private String paymentVoucherRemark;

    /** 创建人*/
    @TableField("create_by")
    private String createBy;

    /** 创建时间*/
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /** 核准人*/
    @TableField("approved_by")
    private String approvedBy;

    /** 核准时间*/
    @TableField("approved_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date approvedTime;

    /** 更新人*/
    @TableField("update_by")
    private String updateBy;

    /** 更新时间*/
    @TableField("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /** 过账人*/
    @TableField("posting_by")
    private String postingBy;

    /** 过账时间*/
    @TableField("posting_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date postingTime;

    /** 水单*/
    @TableField("water_bill_img")
    private String waterBillImg;

    /** 水单表ID*/
    @TableField("water_receipt_id")
    private String waterReceiptId;

    /** 驳回备注*/
    @TableField("reject_remark")
    private String rejectRemark;

    /** 是否撤回，0否，1是*/
    @TableField("delete_status")
    private String deleteStatus;

    /** 撤回备注*/
    @TableField("revoke_remark")
    private String revokeRemark;

    public PaymentVoucher(String paymentVoucherId, String paymentMasterId, String procuredOrderId, String paymentRequestId,
                          String paymentVoucherStatus, String paymentVoucherType, BigDecimal paymentVoucherAmountDue ,String paymentVoucherRemark,
                          String createBy, Date createTime) {
        this.paymentVoucherId = paymentVoucherId;
        this.paymentMasterId = paymentMasterId;
        this.procuredOrderId = procuredOrderId;
        this.paymentRequestId = paymentRequestId;
        this.paymentVoucherStatus = paymentVoucherStatus;
        this.paymentVoucherType = paymentVoucherType;
        this.paymentVoucherAmountDue = paymentVoucherAmountDue;
        this.paymentVoucherRemark = paymentVoucherRemark;
        this.createBy = createBy;
        this.createTime = createTime;
    }
    public  PaymentVoucher(){}
}
